package com.owen.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ApplicationUtil {
    private static Properties properties = null;


    public Properties getApplication() {
        InputStream fis = null;

       if (properties == null){
           try {
               properties = new Properties();
               fis = getClass().getResourceAsStream("/application.properties");
               properties.load(fis);
           } catch (IOException e) {
               e.printStackTrace();
           } finally {
               if (fis != null) {
                   try {
                       fis.close();
                   } catch (IOException e) {
                       e.printStackTrace();
                   }
               }
           }
       }
        return properties;
    }

}
